package com.homson.coreservice.serviceinfrastructure.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: homson_leo
 * @contact: hey_超级巨星（Homson_Leo）- 刘泓岑 1196816884@qq.com
 * @time: 2025/10/19 12:53 PM
 **/
@Configuration
public class RedissonConfig {
    @Bean
    public RedissonClient redissonClient(){
        //配置
        Config config=new Config();
        
        //单节点模式
        config.useSingleServer().setAddress("redis://localhost:6379").setPassword("933114641lbj");
        // 创建RedissonClient
        return Redisson.create(config);
    }
}
